package com.diaohw.platform.remote.log;

import com.diaohw.platform.common.constant.ServiceConstant;
import com.diaohw.platform.common.obj.log.DbLog;
import com.diaohw.platform.common.obj.log.RequestLog;
import com.diaohw.platform.framework.openfeign.GlobalFeignResultConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = ServiceConstant.log, url = "${platform.openfeign.log:}", configuration = GlobalFeignResultConfig.class)
public interface LogRemoteService {

    @PostMapping("/log-storage/http")
    void insert(@RequestBody RequestLog requestLog);

    @PostMapping("/log-storage/db")
    void insert(@RequestBody DbLog dbLog);
}
